#pragma once

#include "../Utility/Dictionary.h"//Dictionary
#include "DynamicArray.h"//Dynamic array
#define MAX_FREQUENCE   2079997//7528283+329805  //1993123+86874 
#define MAX_SENTENCE_LEN 2000

class CSegGraph  
{
public:
	bool GenerateWordNet(char *sSentence,CDictionary &dictCore,bool	bOriginalFreq=false);
	//Generate the segmentation word net according the original sentence
	//sSentence: the sentence
	//dictCore: core dictionary
	//bool	bOriginalFreq=false: output original frequency
	CSegGraph();
	virtual ~CSegGraph();
	char m_sAtom[MAX_SENTENCE_LEN][WORD_MAXLENGTH];//pAtoms: the buffer for returned segmented atoms
						// Such as a Chinese Char, digit, single byte, or delimiters
	int m_nAtomLength[MAX_SENTENCE_LEN];//Save the individual length of atom in the array
	int m_nAtomPOS[MAX_SENTENCE_LEN];//pAtoms: the POS property 
	unsigned int m_nAtomCount;//The count of atoms

	CDynamicArray m_segGraph;	
	//segGraph: The segmentation word graph
	//Row first array
protected:
	bool AtomSegment(char *sSentence);
	//Segment the atomic members from the original sentence
	//sSentence: the sentence
	//pAtoms: the buffer for returned segmented atoms
	//        Such as a Chinese Char, digit, single byte, or delimiters
};
